import { Questions } from "@/api/question";

const types = ["单选题", "多选题", "简答题", "编程题"];

export function sortformTypes(questions: Questions[]) {
  return questions.sort(
    (a, b) => types.indexOf(a.type) - types.indexOf(b.type)
  );
}